import { Route, Routes, Navigate } from 'react-router-dom';

// 引入页面
import Issues from '../pages/Issues';
import Books from '../pages/Books';
import Interviews from '../pages/Interviews';
import IssueDetail from '../pages/IssueDetail';
import AddIssue from '../components/AddIssue';

function RouteConfig() {
  return (
    <Routes>
      <Route path="/issues" element={<Issues />} />
      <Route path="/issues/:id" element={<IssueDetail />} />
      <Route path="/addIssue" element={<AddIssue />} />
      <Route path="/books" element={<Books />} />
      <Route path="/interviews" element={<Interviews />} />
      <Route path="/" element={<Navigate replace to="/issues" />} />
    </Routes>
  );
}

export default RouteConfig;
